/**
 * Created by Administrator on 2017/2/12.
 */
import { NgModule }             from '@angular/core';
import { RouterModule, Routes } from '@angular/router';

import { MainComponent }                from './main.component';
import { pubu }                         from './pubu/pubu';
import { MapComponent }                 from './map/map';
import { VipComponent }                 from './vip/vip';
import { PasswordComponent }            from './forgotpassword/password';
import { ResetComponent }               from './resetpassword/resetpassword';
import { FactoryComponent }             from './factory/factory';
import { ResfactoryComponent }          from './resdetail/resdetail';
import { NologinComponent }             from './factorynologin/factorynologin';
import { PersonalComponent }            from './personalcenter/personal';
import { CollectComponent }             from './collect/collect';
import { UploadComponent }              from './factoryupload/factoryupload';
import { EditComponent }                from './useredit/useredit';
import { FactoryeditComponent }         from './factoryedit/factoryedit';
import { DonaComponent }                 from './donation/donation';
import { DonatwoComponent }                 from './donationtwo/donatwo';
import { DonathreeComponent }                 from './donathree/donathree';
import { DonafourComponent }                 from './donafour/donafour';
import { FacdetailComponent }                 from './factorydetail/facdetail';
import { ReseditComponent }                 from './resedit/resedit';
import { RegisterComponent }                 from './userregister/register';



const Mainroutes: Routes = [
  {
    path: '',
    component: MainComponent,
    children: [
      {path: '', redirectTo: '/link-center/', pathMatch: 'full'},
      {path: 'link-center/:govaul',           component: pubu},
      {path: 'linkMap',               component: MapComponent},
      {path: 'linkVip',               component: VipComponent},
      {path: 'linkPassword',          component: PasswordComponent},
      {path: 'linkReset',             component: ResetComponent},
      {path: 'linkFactory',           component: FactoryComponent},
      {path: 'linkRes/:id',               component: ResfactoryComponent},
      {path: 'linkNologin/:id',           component: NologinComponent},
      {path: 'linkPersonal',               component: PersonalComponent,},
      {path: 'linkCollect/:id',            component: CollectComponent},
      {path: 'linkUpload/:samename',   component: UploadComponent},
      {path: 'linkEdit',               component: EditComponent},
      {path: 'linkfactoryEdit',        component: FactoryeditComponent},
      {path: 'linkDonation',            component: DonaComponent},
      {path: 'linkDonatwo/:money',           component: DonatwoComponent},
      {path: 'linkDonathree',         component: DonathreeComponent},
      {path: 'linkDonafour',          component: DonafourComponent},
      {path: 'linkFacdetail/:id/:facname',         component: FacdetailComponent},
      {path: 'linkResedit',           component: ReseditComponent},
      {path: 'linkRegister',          component: RegisterComponent},
      {path: 'link-center',           component: pubu},
    ]
  }
];

@NgModule({
  imports: [ RouterModule.forChild(Mainroutes) ],
  exports: [ RouterModule ]
})
export class MainRoutingModule {}
